-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCons: Add explicit dependencies on thirdparty code in cloned env #44457
SCons: Add explicit dependencies on thirdparty code in cloned env #44457
Conversation
9aa74b7
to
a82163e
Compare
Tested on Windows 10: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build works fine on macOS, tested incremental build and full build.
But changing thirdparty code .cpp
files do not trigger module rebuild (at least with TextServer), changing headers do.
Thanks, I'll look into it further. It works for the way bullet is handled, but maybe the explicit dependency on StaticLibraries created in the TextServer module doesn't work. |
Hm I could reproduce (and fix) the issue with This is what I get after adding an unused define in
So the |
Since we clone the environments to build thirdparty code, we don't get an explicit dependency on the build objects produced by that environment. So when we update thirdparty code, Godot code using it is not necessarily rebuilt (I think it is for changed headers, but not for changed .c/.cpp files), which can lead to an invalid compilation output (linking old Godot .o files with a newer, potentially ABI breaking version of thirdparty code). This was only seen as really problematic with bullet updates (leading to crashes when rebuilding Godot after a bullet update without cleaning .o files), but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
a82163e
to
c7b53c0
Compare
Hm, I have tested it a few times again, and it seems to work, probably I messed up with the changed files or accidentally ran scons twice. |
Backported to |
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.
So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).
This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.
Supersedes the SCons changes in #44455 by applying them to the whole codebase.